
$(document).ready(function(){



    OPENID=getUrlParam('openid');
    TERMINALID=getUrlParam('terminalid');
    SEXAREA=getUrlParam('sex');



    if(TERMINALID.length==0 || TERMINALID=='1'){
        TERMINALID="1";
       // DEALERNAME="1";
       // TERMINALNAME="2";
    }
    console.log(DEALERNAME, TERMINALNAME,OPENID,TERMINALID);


    $('#womanAppointment').click(function(){

       SEXAREA='2';
        window.location.href="/htmlFive/weixin/store/storeOne.jsp?terminalid="+TERMINALID+"&openid="+OPENID+"&flag="+1+"&sex="+SEXAREA+"";

        // window.location.href="/htmlFive/weixin/store/storeOne.jsp?terminalid="+TERMINALID+"&openid="+OPENID+"&dealerName="+DEALERNAME+"&terminalName="+TERMINALNAME+"&flag="+1+"&sex="+SEXAREA+"";


    });
    $('#manAppointment').click(function(){

        SEXAREA='1';
        window.location.href="/htmlFive/weixin/store/storeOne.jsp?terminalid="+TERMINALID+"&openid="+OPENID+"&flag="+1+"&sex="+SEXAREA+"";


        //window.location.href="/htmlFive/weixin/store/storeOne.jsp?terminalid="+TERMINALID+"&openid="+OPENID+"&dealerName="+DEALERNAME+"&terminalName="+TERMINALNAME+"&flag="+1+"&sex="+SEXAREA+"";



    });






    /** 返回刷新 */
    function pushHistory(){
        console.log('app刷新');
        window.addEventListener("popstate", function(e) {
            self.location.reload();
        }, false);
        var state = {title : "",url : "#"};

        window.history.replaceState(state,"","#");

    }



    /*  Swiper顶部广告样式控制 */
    var mySwiper = new Swiper ('#top_ad',{
        loop: true, // 循环模式选项
        autoplay: true,
        pagination: {
            el: '.swiper-pagination',
            hideOnClick :true,
            renderBullet: function (index, className) {
                return '<span class="' + className + '"></span>';
            },
        },
    });

// Swiper页面底部存取菜单按钮触发动作   选择数量-页面的tabbar生效
    var STmodalChoose = new Swiper('#STmodalChoose');

    $('#btn_store').click(function(){ self.location.reload();});

    $('#btn_take').click(de(function(){

        console.log(OPENID,SEXAREA);
        if(SEXAREA=='' || SEXAREA==null || SEXAREA==undefined){
            SEXAREA=0;
        }

        btnTakes();

    }));






});




//window.location.href="/htmlFive/weixin/store/appointment.jsp?terminalID="+TERMINALID+"&openID="+OPENID+"&dealerName="+DEALERNAME+"&terminalName="+TERMINALNAME;'









